﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="ProjectTasks.aspx.cs" Inherits="ProjectTasks" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="static/js/css/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />

    <script src="static/js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function() {

            $(".dialog").dialog({
                modal: true,
                autoOpen: false,
                buttons: {
                    "Close": function() {
                        $(this).dialog("close");
                    }
                },
                open: function(type, data) {
                    $(this).parent().appendTo("form");
                }
            });

        });
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="Server">
    <div class="mbox">
        <h1>
            <a href="#">Project Tasks</a></h1>
        <div class="text">
            <table cellpadding="2" cellspacing="0" border="0" style="width: 100%">
                <tr>
                    <td>
                        Select Project:
                    </td>
                    <td>
                        &nbsp;
                        <asp:DropDownList ID="ddlMyProjects" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlMyProjects_SelectedIndexChanged">
                        </asp:DropDownList>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:GridView ID="gvProjectTasks" runat="server" CellPadding="4" ForeColor="#333333"
                            GridLines="Vertical" AutoGenerateColumns="False" Width="100%">
                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <a onclick="$('#<%=hdfItemCode.ClientID %>').val('<%# Eval("Task_Code") %>');$('#dialogClose').dialog('open');">
                                            Close</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Task Details">
                                    <ItemTemplate>
                                        <strong>
                                            <%#Eval("Task_Title") %></strong>
                                        <br />
                                        <span>
                                            <%#Eval("Task_Desc")%></span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Open_Date" DataFormatString="{0:D}" HeaderText="Start Date" />
                                <asp:BoundField DataField="Deadline" DataFormatString="{0:D}" HeaderText="Deadline" />
                            </Columns>
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#999999" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
                        <asp:HiddenField ID="hdfItemCode" runat="server" />
                        <div id="dialogClose" title="Close Task" class="dialog">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                                <ContentTemplate>
                                    <table border="0">
                                        <tr>
                                            <td>
                                                Confirm:
                                            </td>
                                            <td>
                                                &nbsp;
                                                <asp:CheckBox ID="chkConfirm" runat="server" Text="This task has been completed." />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="lblStatus" runat="server" ForeColor="Red" Visible="False" />
                                            </td>
                                            <td>
                                                &nbsp;
                                                <asp:Button ID="btnCloseTask" runat="server" OnClientClick="this.style.display='none';"
                                                    Text="Close Task" OnClick="btnCloseTask_Click" />
                                                &nbsp;&nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Visible="False"></asp:Label>
                    </td>
                </tr>
            </table>
        </div>
        <div class="footer">
            <div class="bookmarks">
                <a href="Default.aspx">Go to Home</a>
            </div>
            <a href="Compose.aspx">Compose a Message</a> | <a href="UploadDocument.aspx">Upload
                a Documents</a>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphSide" runat="Server">
</asp:Content>
